package com.ruoyi.mall.home.controller;

import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.mall.home.service.IAdminHomeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * 后台首页
 *
 * @author xuxing
 * @date 2021-02-27
 */
@RestController
@RequestMapping("/admin/home")
public class AdminHomeController extends BaseController {

    @Autowired
    private IAdminHomeService adminHomeService;

    /**
     * 获取首页数据
     */
    @GetMapping("/getAdminHomeInfo")
    public AjaxResult getAdminHomeInfo() {
        return AjaxResult.success(adminHomeService.selectAdminHomeInfo());
    }
}